***Label Variables***
#delimit;
clear;
use ash2022_democratization_replication;
label var r1_tahrir "Hizb-ut-Tahrir Prime";
label var r1_nahda "Ennahdha Prime";
label var r2 "Nidaa Prime";
label var r3 "Nahdha Moderation Prime";
label var r2r3 "Both Moderation and Nidaa Primes Administered";
label var GENDER "Female";
label var Q1 "Age";
label var Q2 "Income";
label var Q3 "Education";
label var  unemployed_parttime "Underemployment";
label var Q6_recode "Frequency of Prayer";
label var Q8_recode "Secularism";
label var Q9_recode "Support for Gender-Mixed Education";
label var Q10 "Individual Economic Deprivation";
label var Q11 "Group Political Deprivation";
label var Q12 "Region Political Deprivation";
label var r4 "Coup Protest Prime";
label var partysupport "Party Support";
label var Q19 "Protest Participation since 2011";
label var region_ce "Central East Region";
label var region_cw "Central West Region";
label var region_nw "Northwest Region";
label var region_so "South Region";
label var id "Response ID";
label var BID "Cluster Code" ;
label var party_en "Party Support Label" ;
label var Q4 "Employment Responses"   ;
label var Q18 "Party Support (Arabic)" ;
label var Q21_1 "List Control" ;
label var Q21_2 "List Treatment" ;
label var Q22 "Nidaa Ben Ali History Favorability" ;
label var Q23 "Ennahdha Reform Favorability" ;
label var Q24 "Nidaa Tounes Favorability"  ;
label var Q25 "Ennahdha Favorability"  ;
label var Q26_1 "Endorsement Control"  ;
label var Q26_2 "Endorsement Ennahdha" ;
label var Q26_3 "Endorsement Hizb-ut-Tahrir" ;
label var Q27_1 "Protest Local Reform"  ;
label var Q27_1 "Protest Local Reform" ;
label var q21_full "List Question Full"    ;
label var r1 "Endorsement Treatments"    ;
label var q26_full "Endorsement Experiment Full"     ;
label var q27_full "Protest Question Full"     ;
label var r1_binary "Endorsement Treatment Binary"      ;
label var nahda_support "Support for Ennahdha (Open-ended)"    ;
label var nidaa_support "Support for Nidaa (Open-ended)"     ;
label var rural "Respondent from Rural Area"    ;
label var unempl_fem "Underemployed*Female"   ;
label var unempl_edu "Underemployed*Education"     ;
label var unempl_age "Underemployed*Age"     ;
label var unempl_rur "Underemployed*Rural"     ;
label var  Q22_recode "Nidaa Ben Ali History Favorability"    ;
label var  Q23_recode "Ennahdha Reform Favorability"    ;
label var  Q24_recode "Nidaa Tounes Favorability"     ;
label var  Q25_recode "Ennahdha Favorability"     ;
label var  underemp_partysup "Underemployment*Party Support"    ;
label var  coalition_fav "Favorability of Both Nidaa and Nahdha"   ;
label var   underemp_coalition_fav "Underemployment*Favorability of Both Nidaa and Nahdha"   ;
label var   nahda_nidaa_fav  "Favorability of Either Nidaa or Nahdha"    ;
label var   underemp_nahda_nidaa_fav "Underemployment*Favorability of Either Nidaa or Nahdha"     ;
label var   nahda_nidaa_support "Support of Either Nidaa or Nahdha"    ;
label var   underemp_nahda_nidaa_sup  "Underemployment*Support of Either Nidaa or Nahdha"   ;
drop EXPERIENCE D1 D10 D11 D12  Q5A Q5AOTHER Q5 Q14  Q14OTHER Q15 Q16 Q16_OTHER Q17 Q17_OTHER secular_binary gender_mix education_binary;
drop Q23_secular  Q23_GENDER Q23_Q1 Q23_Q2 Q23_education Q23_Q6 Q23_Q9 Q23_Q13 Q23_nahda Q23_nidaa Q23_partysupport q25_attrition q25_imputed q21_listonly;
drop  education_noformal education_elementary education_highschool education_university education_higher secularism_agree secularism_strongagree secularism_niether secularism_disagree secularism_strongdisagree  Q25_recode_imputed Q25_recode_a;
save ash2022_democratization_replication, replace;

***T-Tests***
tab Q27 r4;
ttest q27 if r4==1, by(r2);
ttest q27 if r4==1, by(r3);
ttest q27 if r4==1, by(r1_tahrir);

svyset BID [iw=weight];

***Table 1: Why do people support coup protest***
#delimit;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 Q1 unemployed rural region_ce region_cw region_nw region_so if r4==1;
eststo main1;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 GENDER Q1 Q3 unemployed Q6_recode Q8_recode Q9_recode partysupport Q19 rural region_ce region_cw region_nw region_so  if r4==1;
eststo main2;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 GENDER Q1 Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode partysupport Q19 rural region_ce region_cw region_nw region_so  if r4==1;
eststo main3;
estout main1 main2 main3 using main.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



***Table 2: How are Coup Protesters Different from non-coup Protesters***
#delimit;
xi: svy: logit q27  i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*Q1 i.r4*unemployed i.r4*rural i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo het1;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*Q3 i.r4*unemployed i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*partysupport i.r4*Q19 i.r4*rural i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo het2;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*Q2 i.r4*Q3 i.r4*unemployed i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode  i.r4*partysupport i.r4*Q19 i.r4*rural  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo het3;
estout het1 het2 het3 using het.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***APPENDIX***

***Table A1: REIGN Data Ranking for Tunisia (2011-2020)****
clear;
use reign_ranking;
list year couprisk rank if country=="Tunisia" & year<2020;

***Table A2: Balance Tests***
clear;
use ash2022_democratization_replication;
#delimit;
svy: logit r1_binary GENDER Q1  Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode rural Q19 region_ce region_cw region_nw region_so ;
eststo bal1;
svy: logit r2 GENDER Q1  Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode rural Q19 region_ce region_cw region_nw region_so ;
eststo bal2;
svy: logit r3 GENDER Q1  Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode rural Q19 region_ce region_cw region_nw region_so ;
eststo bal3;
svy: logit r4 GENDER Q1  Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode rural Q19 region_ce region_cw region_nw region_so ;
eststo bal4;
estout bal1 bal2 bal3 bal4 using balance_coup.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



***Table A3: Why do people support regular protest***

#delimit;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 Q1 unemployed rural region_ce region_cw region_nw region_so if r4==0;
eststo reg1;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 GENDER Q1 Q3 unemployed Q6_recode Q8_recode Q9_recode Q19 rural region_ce region_cw region_nw region_so  if r4==0;
eststo reg2;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 GENDER Q1 Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode Q19 rural region_ce region_cw region_nw region_so  if r4==0;
eststo reg3;
estout reg1 reg2 reg3 using reg.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Table A4: Linear Probability Models of Table 2 in Main Article***
#delimit;
xi: svy: reg q27  i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*Q1 i.r4*unemployed i.r4*rural i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so;
eststo het4;
xi: svy: reg q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*Q3 i.r4*unemployed i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*partysupport i.r4*Q19 i.r4*rural i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so;
eststo het5;
xi: svy: reg q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*Q2 i.r4*Q3 i.r4*unemployed i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode  i.r4*partysupport i.r4*Q19 i.r4*rural  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so;
eststo het6;
estout het4 het5 het6 using het_lpm.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 



***Table A5: Favorability of Nahda and Nidaa: Caveat that these are post-treatment covariates***
#delimit;
svy: logit q27  r1_tahrir r1_nahda r2 r3 r2r3 GENDER Q1 Q3 unemployed Q6_recode Q8_recode Q9_recode Q19 rural Q24_recode Q25_recode region_ce region_cw region_nw region_so  if r4==1;
eststo posttreat1;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*Q3 i.r4*unemployed i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode  i.r4*partysupport  i.r4*Q19 i.r4*rural  i.r4*Q24_recode i.r4*Q25_recode i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo posttreat2;
estout posttreat1 posttreat2 using postt.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


**Table A7: Nostalgia for the Dictatorship and Coup Support
#delimit;
svy: logit q27  r1_tahrir r1_nahda r3 Q22_recode GENDER Q1 Q3 unemployed Q6_recode Q8_recode Q9_recode Q19 rural region_ce region_cw region_nw region_so  if r4==1;
eststo nostalgia1;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda  i.r4*r3 i.r4*Q22_recode i.r4*GENDER i.r4*Q1 i.r4*Q3 i.r4*unemployed i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*Q19 i.r4*rural i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo nostalgia2;
estout nostalgia1 nostalgia2 using nostalgia.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A8: Conditional Effects of Unemployment across age, rurality, party support and gender****
#delimit;
replace unempl_fem=unemploy*GENDER;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*unempl_fem i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int1;
replace unempl_age=unemploy*Q1;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*unempl_age i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int3;
replace unempl_rur=unemploy*rural;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*unempl_rur i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int4;
replace underemp_partysup=partysupport*unemployed_parttime;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*underemp_partysup i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int5;
estout int1 int3 int4 int5 using int.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A6: Conditional Effects of Underemployment on Coalition Support****
#delimit;
gen coalition_fav=0;
replace coalition_fav=. if Q24_recode==. & Q25_recode==.;
replace coalition_fav=1 if Q24_recode==4 & Q25_recode==4;
replace coalition_fav=1 if Q24_recode==5 & Q25_recode==4;
replace coalition_fav=1 if Q24_recode==4 & Q25_recode==5;
replace coalition_fav=1 if Q24_recode==5 & Q25_recode==5;
gen underemp_coalition_fav=unemployed_parttime*coalition_fav;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*coalition_fav i.r4*underemp_coalition_fav i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int6;

#delimit;
gen nahda_nidaa_fav=0;
replace nahda_nidaa_fav=. if Q24_recode==. & Q25_recode==.;
replace nahda_nidaa_fav=1 if Q24_recode==4 | Q25_recode==4 | Q24_recode==5 | Q25_recode==5;
gen underemp_nahda_nidaa_fav=unemployed_parttime*nahda_nidaa_fav;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*nahda_nidaa_fav i.r4*underemp_nahda_nidaa_fav i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int7;



#delimit;
gen nahda_nidaa_support=0;
replace nahda_nidaa_support=. if Q18==19| Q18==21;
replace nahda_nidaa_support=1 if nidaa_support==1 | nahda_support==1;
gen underemp_nahda_nidaa_sup=unemployed_parttime*nahda_nidaa_sup;
xi: svy: logit q27   i.r4*r1_tahrir i.r4*r1_nahda i.r4*r2  i.r4*r3 i.r4*r2r3 i.r4*GENDER i.r4*Q1 i.r4*unemployed i.r4*nahda_nidaa_sup i.r4*underemp_nahda_nidaa_sup i.r4*Q2 i.r4*Q3 i.r4*Q6_recode i.r4*Q8_recode i.r4*Q9_recode i.r4*rural  i.r4*partysupport  i.r4*Q19  i.r4*region_ce  i.r4*region_cw  i.r4*region_nw  i.r4*region_so, nocons;
eststo int8;
estout int6 int7 int8 using int2.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


corr  coalition_fav nahda_nidaa_fav nahda_nidaa_support;
tab nahda_nidaa_sup coalition_fav;
tab nahda_nidaa_sup nahda_nidaa_fav;
tab coalition_fav nahda_nidaa_fav;

tab unemployed_part q27_full;
tab unemployed_part q27_full if r4==0,ro;
tab unemployed_part q27_full if r4==1, ro;

tab underemp_coalition_fav q27_full if r4==0,ro;
tab underemp_coalition_fav q27_full if r4==1, ro;

tab underemp_nahda_nidaa_fav q27_full if r4==0,ro;
tab underemp_nahda_nidaa_fav q27_full if r4==1, ro;

tab underemp_nahda_nidaa_sup q27_full if r4==0,ro;
tab underemp_nahda_nidaa_sup q27_full if r4==1, ro;

***Table A12: Coup Protest and Support for Hizb-ut-Tahrir***
#delimit;
xi: logit q27  i.r1*q26_full r2 r3 r2r3 Q1 unemployed rural region_ce region_cw region_nw region_so if r4==1 [pw=weight], vce(cluster BID);
eststo hut1;
xi: logit q27 i.r1*q26_full  r2 r3 r2r3 GENDER Q1 Q3 unemployed Q6_recode Q8_recode Q9_recode partysupport Q19 rural region_ce region_cw region_nw region_so  if r4==1 [pw=weight], vce(cluster BID);
eststo hut2;
xi: logit q27  i.r1*q26_full r2 r3 r2r3 GENDER Q1 Q2 Q3 unemployed Q6_recode Q8_recode Q9_recode partysupport Q19 rural region_ce region_cw region_nw region_so  if r4==1 [pw=weight], vce(cluster BID);
eststo hut3;
estout hut1 hut2 hut3 using hut.tex, replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 


***Underlying Analysis of LexisNexis Protest Data***

#delimit;
clear;
insheet using "protest coding tunisia.csv";
collapse (max) local, by(year month day country city);
replace local=0 if local==.;
tab year local;

***Table A9: Factor Analysis of secularism Afrobarometer variable

#delimit;
use tunab_merge;
encode q41a_arb, gen(secular1);
encode q41b_arb, gen(secular2);
encode q41c_arb, gen(secular3);
encode q41d_arb, gen(secular4);

#delimit;
encode  q39_naf_a, gen(secular1);
encode  q39_naf_b, gen(secular2);
encode  q39_naf_c, gen(secular3);
encode  q39_naf_d, gen(secular4);

recode secular1 (1=4) (2=2) (3=.) (4=3) (5=5) (6=1);
recode secular2 (1=4) (2=2) (3=.) (4=3) (5=5) (6=1);
recode secular4 (1=4) (2=2) (3=.) (4=3) (5=.) (6=5) (7=1);
recode secular3 (1=2) (2=4) (3=.) (4=3) (5=1) (6=5);

#delimit;
factor  religion1 religion2 religion3 religion4, pcf;
rotate;
predict secular;



***Table A10: Afrobarometer Support for Authoritarianism
#delimit;
clear;
use tunab_merge;
ologit military female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation wave6,vce(cluster regioncode) or;
eststo ab1;
ologit military female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6,vce(cluster regioncode) or;
eststo ab2;
ologit single female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6,vce(cluster regioncode) or;
eststo ab3;
ologit personalist female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6,vce(cluster regioncode) or;
eststo ab4;
ologit theo female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6,vce(cluster regioncode) or;
eststo ab5;
estout ab1 ab2 ab3 ab4 ab5 using ab.tex, replace eform cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

***Table A13: Protest Attendance***
#delimit;
logit protest_attended female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation wave6,vce(cluster regioncode) or;
eststo pro1;
logit protest_hypothetical female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation wave6,vce(cluster regioncode) or;
eststo pro2;
logit protest_hypothetical female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation wave6 if protest_attended==0,vce(cluster regioncode) or;
eststo pro3;
logit protest_attended female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6 ,vce(cluster regioncode) or;
eststo pro4;
logit protest_hypothetical female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6,vce(cluster regioncode) or;
eststo pro5;
logit protest_hypothetical female age education employment rural partys ennadha nidaa democracy wrongdirection deprivation secular wave6 if protest_attended==0,vce(cluster regioncode) or;
eststo pro6;
estout pro1 pro2 pro3 pro4 pro5 pro6 using protest_attendance.tex, eform replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

****Table A11: Democracy Support Uncorrelated with Underemployment***
tab democracy;
corr democracy employment;
#delimit;
ologit democracy female age education employment rural partys ennadha nidaa wrongdirection deprivation wave6,vce(cluster regioncode) or;
eststo demo1;
ologit democracy female age education employment rural partys ennadha nidaa wrongdirection deprivation secular wave6,vce(cluster regioncode) or;
eststo demo2;
estout demo1 demo2 using demo.tex, eform replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

clear;
***Table A14: Protest Attendance***
#delimit;
clear;
use arabbar_tunisia;
logit protest_benali age female education underemployed rural economic_assess gender_mixed secular democracy, vce(cluster q1) or;
eststo pro7;
logit protest_postbenali age female education underemployed rural economic_assess gender_mixed secular democracy, vce(cluster q1) or;
eststo pro8;
logit protest_wave34 wave age female education underemployed rural economic_assess gender_mixed secular democracy, vce(cluster q1) or;
eststo pro9;
estout pro7 pro8 pro9 using protest_attendance2.tex, eform replace cells(b(star fmt(%9.3f)) se(par)) stats(r2_a N, fmt(%9.3f %9.0g) labels(R-squared)) legend label collabels(none) varlabels(_cons \_cons) style(tex); 

